Also, do you guys have any resources on algorithms on ASTs, for type checking, maybe about linear typing and borrow checking as well? That's assuming the AST is the place where I'm supposed to check this sort of stuff.
There are a number of different approaches to typechecking, so there isn't a single answer or direction to go. For systems that support strong type inference, there are two well-known approaches: Hindley-Milner (HM) and bidirectional (bidir) systems, and these approaches aren't entirely separate (HM is often put in bidirectional checking to help with generics). There is also the simpler unidirectional approach taken by older languages e.g. Java, and the simpler way of handling generics by annotating every generic function and datastructure.
Giving direction on typechecking is unfortunately difficult because it is opinionated, because there is a line to straddle with wh